import { Package, Code, Globe, Palette, MessageCircle, Gamepad2, Image, Music, FileText, Grid, type Icon } from 'lucide-solid';

const iconMap: Record<string, typeof Icon> = {
  'code': Code,
  'globe': Globe,
  'palette': Palette,
  'message-circle': MessageCircle,
  'gamepad-2': Gamepad2,
  'image': Image,
  'music': Music,
  'file-text': FileText,
  'grid': Grid
};

export const getIconComponent = (iconName?: string): typeof Icon => {
  if (!iconName) return Package;
  return iconMap[iconName] || Package;
};